﻿namespace PersonaLibrary.Commands.EditCommands
{
    public class DeleteConnection : CommandBase
    {
        public override bool CanExecute(object parameter)
        {
            return parameter is int;
        }

        public override void Execute(object parameter)
        {
            var conRep = (DataModel.ConnectionRepository)DataModel.DataBase.GetRepository<DataModel.ConnectionRepository, DataModel.ConnectionEntity>();
            conRep.Delete((int)parameter);
        }
    }
}
